package com.han.news.config;

import com.baomidou.mybatisplus.core.injector.ISqlInjector;
import com.baomidou.mybatisplus.extension.injector.LogicSqlInjector;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.transaction.annotation.EnableTransactionManagement;

/**
 * @authou HanDianWei
 * @create 2020-11-24 23:51
 */
@MapperScan("com.han.news.mapper")
@EnableTransactionManagement
@Configuration //配置类
public class MyBatisPlusConfig {

//     逻辑删除组件！
    @Bean
    public ISqlInjector sqlInjector() {
      return new LogicSqlInjector();
    }
}
